package com.vincce.sport.mapper;

import java.util.List;
import java.util.Map;

import com.vincce.sport.core.MyBatisRepository;
import com.vincce.sport.entity.CompetitionTeam;
import com.vincce.sport.entity.Team;

@MyBatisRepository
public interface CompetitionTeamMapper {

	public Long insert(CompetitionTeam competitionTeam);
	
	public Long update(CompetitionTeam competitionTeam);
	
	public List<CompetitionTeam> findCompetitionTeamList(Map<String, Object> map);
	
	public Long findCompetitionTeamCount(Map<String, Object> map);
	
	public CompetitionTeam findCompetitionTeamById(Long id);
	
	public Long deleteByGroupId(Long groupId);
	
	/**
	 * 获取还没参赛球队数据
	 * @param team
	 * @return
	 */
	public List<Team> findNoCompetitionTeam(Map<String, Object> map);

	public List<CompetitionTeam> queryTeamInfo(Map map);
	
	/**
	 * 获取小组各个球队积分
	 * @param groupId
	 * @return
	 */
	public List<CompetitionTeam> queryGroupTeamScore(Long groupId);
	
	/**
	 * 重置小组排名
	 * @return
	 */
	public Long updateType(Long groupId);
}
